#
# Copyright © 2021 深圳百问网科技有限公司 All Rights Reserved.
# 视频在线学习：https://www.100ask.net
# 硬件购买地址：https://shop502068889.taobao.com
#
# SPDX-License-Identifier: BSD-3-Clause
#

"""
接线：
    VCC --- 3.3V
    GND --- GND
    SDA --- 21
    SCL --- 22
"""

# Complete project details at https://RandomNerdTutorials.com

from machine import Pin, SoftI2C
import ssd1306
from time import sleep

# Pin assignment 
i2c = SoftI2C(scl=Pin(22), sda=Pin(21), freq=200000)

oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)

oled.text('Hello ^_^ ~', 0, 0)
oled.text('www.100ask.net!', 0, 10)
oled.text('www.100ask.net!', 0, 20)
oled.text('www.100ask.net!', 0, 30)
oled.text('www.100ask.net!', 0, 40)
oled.text('www.100ask.net!', 0, 50)

oled.show()
